<div class="wrap">
<?php screen_icon( 'option-main' ); ?>
<h2>
	<?php _e("Options") ?> 
</h2>

<?php if ( $notice ) : ?>
	<div id="notice" class="error"><p><?php echo $notice ?></p></div>
<?php endif; ?>
<?php if ( $message ) : ?>
	<div id="message" class="updated"><p><?php echo $message; ?></p></div>
<?php endif; ?>

<form action="" method="post" accept-charset="utf-8">
	<?php wp_nonce_field( 'ecatalog-option', '_option_nonce' ); ?>
	
	<h3><?php _e('General') ?></h3>
	
	<table class="form-table">
		<tbody>	
			<tr valign="top">
				<th scope="row">
					<label for="defaultCategory"><?php _e('Default Category') ?></label>
				</th>
				<td>
				<?php
					$dropdown_options = array('name' => 'defaultCategory', 'show_option_all' => __('None'), 'hide_empty' => 0, 'hierarchical' => 1,
							'show_count' => 0, 'orderby' => 'name', 'taxonomy' => 'ecatalog_category', 'selected' => $o['defaultCategory']);
					wp_dropdown_categories($dropdown_options);
				?>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row">
					<label for="resultPerPage"><?php _e('Result Per Page (back-end)') ?></label>
				</th>
				<td>
					<input type="text" class="small-text" value="<?php echo $o['resultPerPage'] ?>" id="resultPerPage" name="resultPerPage">
				</td>
			</tr>
		</tbody>	
	</table>
	
	<h3><?php _e('Thumbnail') ?></h3>
	
	<table class="form-table">
		<tbody>	
			<tr valign="top">
				<th scope="row">
					<label for="thumbPrefix"><?php _e('Filename Prefix') ?></label>
				</th>
				<td>
					<input type="text" class="regular-text" value="<?php echo $o['thumbPrefix'] ?>" id="thumbPrefix" name="thumbPrefix">
					<span class="description">Changing this doesn't affect current image thumbnails.</span>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row">
					<label for="thumbMaxWidth"><?php _e('Maximum Width') ?></label>
				</th>
				<td>
					<input type="text" class="small-text" value="<?php echo $o['thumbMaxWidth'] ?>" id="thumbMaxWidth" name="thumbMaxWidth"> pixels
				</td>
			</tr>
			<tr valign="top">
				<th scope="row">
					<label for="thumbMaxHeight"><?php _e('Maximum Height') ?></label>
				</th>
				<td>
					<input type="text" class="small-text" value="<?php echo $o['thumbMaxHeight'] ?>" id="thumbMaxHeight" name="thumbMaxHeight"> pixels
				</td>
			</tr>
		</tbody>	
	</table>
	
	<h3><?php _e('Uploading') ?></h3>
	
	<table class="form-table">
		<tbody>	
			<tr valign="top">
				<th scope="row">
					<label for="uploadExtAllowed"><?php _e('Allowed File Extensions') ?></label>
				</th>
				<td>
					<input type="text" class="regular-text" value="<?php echo $o['uploadExtAllowed'] ?>" id="uploadExtAllowed" name="uploadExtAllowed">
					<span class="description">Separate extensions with commas.</span>
				</td>
			</tr>
			<tr valign="top">
				<th scope="row">
					<label for="uploadTypeAllowed"><?php _e('Allowed File Content-Type') ?></label>
				</th>
				<td>
					<input type="text" class="regular-text" value="<?php echo $o['uploadTypeAllowed'] ?>" id="uploadTypeAllowed" name="uploadTypeAllowed">
					<span class="description">Separate content-type with commas.</span>
				</td>
			</tr>
		</tbody>	
	</table>
	
	<p class="submit">
		<input type="submit" value="Save Changes" class="button-primary" name="Submit">
	</p>

</form>	

</div>